package com.xmg.mgrsite.base;

import com.xmg.p2p.base.query.UserFileQO;
import com.xmg.p2p.base.service.IUserFileService;
import com.xmg.p2p.base.util.JSONResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class UserFileMGRController {
    @Autowired
    private IUserFileService userFileService;

    @RequestMapping("userFileAuth")
    public String query(@ModelAttribute("qo") UserFileQO qo, Model model) {
        model.addAttribute("pageResult", userFileService.query(qo));
        return "userFileAuth/list";
    }
    @RequestMapping("userFile_audit")
    @ResponseBody
    public JSONResult audit(Long id,int score,String remark,int state){
        userFileService.audit(id,score,remark,state);
        return new JSONResult();
    }
}

